home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / cool / ge_cool.lha / GE_COOL2.1 / src / Set / TODO < prev   
Text File  |  1992-05-12  |  844b  |  27 lines

  1. File: Set.h
  2.  
  3. Enforce const for set operations + - ^ |, etc...
  4. Currently, const cannot be enforced because the curpos pointer changes.
  5. Save curpos and restore it, so that const is enforced.
  6. DONE
  7.  
  8. ********
  9. *** All the comments in cool/Hash_Table/TODO apply to Set
  10. ********
  11.  
  12. operator| operator^
  13.   These can be re-written to copy "this" to a temporary, and call
  14.   the matching operator|= or operator^= method.
  15.   For example:
  16.  
  17. template <class Type> 
  18. Set<Type> Set<Type>::operator| (Set<Type>& s) {
  19.   Set<Type> result(this->length() + s.length()); // Temporary variable
  20.   for (this->reset(); this->next (); )        // For each entry in 1st set
  21.     result->put (this->value());        // Put entry to result set
  22.   result.operator|=(s);
  23.   return result;                // Return resulting union
  24. }
  25.  
  26. test_Set depends on the hash sequence of the Sun/4.  This needs to be fixed.
  27.